package test.com.sky.designPattern.observerPattern.observer;

import java.util.Observable;
import java.util.Observer;

/**
 * @author : wushikai
 * <p>
 * date : 2022-05-30
 * 观察者
 */
class Watcher implements Observer {

    @Override
    public void update(Observable o, Object arg) {
        if (arg.toString().equals("openWindow")) {
            System.out.println("打开窗口");
        }
    }
}
